<!DOCTYPE html>
<html>
<head>
<title>商盟统统付标准收银台接口</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<?php


$mer_no = $_POST ["mer_no"];
date_default_timezone_set ( "Asia/Shanghai" );
$timestamp = date ( 'YmdHis' );
$terminal_type = $_POST ["terminal_type"];
$url = 'https://test.sumpay.cn/entrance/gateway.htm';#$url = 'https://test.sumpay.cn/entrance/gateway.htm';
$domain = $_POST ["domain"];
$order_no = $_POST ["order_no"];
$sub_mer_no = $_POST ["sub_mer_no"];

$service = 'fosun.sumpay.api.trade.order.search.merchant';

$parameters = [ 
		'app_id' => $mer_no,
		'terminal_type' => $terminal_type,
		'version' => '1.0',
		'service' => $service,
		'timestamp' => $timestamp,
		'mer_no' => $mer_no,
		'format' => 'JSON',
		'order_no' => $order_no
];

if ($sub_mer_no && "" != $sub_mer_no) {
	$parameters ['sub_mer_no'] = $sub_mer_no;
}

$encrypted_fields = array ();
$charset_change_fields = array (
		"terminal_info"
);
$special_fields = array (
		"terminal_info"
);
$json_array_fields = array();
$defaultCharset = 'UTF-8';

include '../tools/SumpayService.php';
$res = execute ( $url, 'UTF-8', $parameters, "../cer/yixuntiankong.pfx", "sumpay", "../cer/dev_pub.pem", $domain, $charset_change_fields, $encrypted_fields, $special_fields, $json_array_fields, $defaultCharset );
//echo json_encode($res);//返回值商户按照自己逻辑处理


?>

</body>
</html>
